import wechatLogo from '@/assets/svg/app-wechat.svg';


// 饼图数据1
const data1 = [
  {
    name: 'Apples',// 数据项名称
    value: 70,// 数据项值
    itemStyle: {
      color: 'orange',//指定系列颜色
    },
  }, {
    name: 'Strawberries',
    value: 68,
    itemStyle: {
      color: '#386cb6'
    }
  }, {
    name: 'Bananas',
    value: 48,
    itemStyle: {
      color: '#984ded'
    }
  },
  {
    name: 'Oranges',
    value: 40,
    itemStyle: {
      color: '#2c944d'
    }
  },
  {
    name: 'Pears',
    value: 32,
    itemStyle: {
      color: '#79ea59'
    }
  },
  {
    name: 'Pineapples',
    value: 27,
    itemStyle: {
      color: '#d1afe1'
    }
  }];

// 饼图数据2
const data2 = [
  {
    name: 'Apples',// 数据项名称
    value: 70,// 数据项值

  }, {
    name: 'Strawberries',
    value: 68,

  }, {
    name: 'Bananas',
    value: 48,

  },
  {
    name: 'Oranges',
    value: 40,

  },
  {
    name: 'Pears',
    value: 32,

  },
  {
    name: 'Pineapples',
    value: 27,

  }];

// 饼图配置项目
export const barOptions = {
  title: [
    {
      text: 'Pie label alignTo'
    },
    {
      subtext: 'alignTo: "none" (default)',
      left: '16.67%',
      top: '85%',
      textAlign: 'center'
    },
    {
      subtext: 'alignTo: "labelLine"',
      left: '50%',
      top: '85%',
      textAlign: 'center'
    },
    {
      subtext: 'alignTo: "edge"',
      left: '83.33%',
      top: '85%',
      textAlign: 'center'
    }
  ],
  series: [
    {
      type: 'pie',// 饼图
      radius: '50%',// 饼图半径（可视区域的百分比）
      center: ['50%', '50%'],
      data: data1,// 饼图数据
      animation: false,//是否开启动画，默认为true
      label: {
        position: 'outer',// 标签的位置 inside/inner,center
        alignTo: 'none',// 标签的对齐方式，仅当 position 值为 'outer' 时有效。'labelLine'：label line 的末端对齐；'edge'：文字对齐
        bleedMargin: 5,// 文字的出血线大小，超过出血线的文字将被裁剪为 '...'
      },
      left: 0,
      right: '66.6667%',
      top: 0,
      bottom: 0
    },
    {
      type: 'pie',
      radius: ['30%', '50%'],// 内半径，外半径
      center: ['50%', '50%'],
      data: data2,
      animation: false,
      label: {
        position: 'outer',
        alignTo: 'labelLine',
        bleedMargin: 5
      },
      left: '33.3333%',
      right: '33.3333%',
      top: 0,
      bottom: 0
    },
    {
      type: 'pie',
      radius: '50%',
      center: ['50%', '50%'],
      data: data2,
      animation: false,
      label: {
        position: 'outer',
        alignTo: 'edge',
        margin: 20
      },
      left: '66.6667%',
      right: 0,
      top: 0,
      bottom: 0
    },
  ],
  color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
};

// 指标卡片数据
export const indicatorData = [
  {
    title: 'INVITES SENT',
    desc: `Then came the night of Mr Trump's triumph. It wasone that few with even the faintest politicalawareness will ever forget.Almost everyone turned outto be wrong—everyone, that is, except the man whoapparently lived in a fantasy world.`,
    rate: '2',
    url: wechatLogo,
  },
  {
    title: 'CLICK RATE',
    desc: `Then came the night of Mr Trump's triumph. It wasone that few with even the faintest politicalawareness will ever forget.Almost everyone turned outto be wrong—everyone, that is, except the man whoapparently lived in a fantasy world.`,
    rate: '1%',
    url: wechatLogo,
  },
  {
    title: 'REVIEWS',
    desc: `Closely related is thecollapse in trust for the media—or the Lügenpresseas Mr Trump's alt-right supporters call it, in a reprisalof Hitler's attacks on the “lying press”.`,
    rate: '40',
    url: wechatLogo,
  },
  {
    title: 'RESPONSE RATE',
    desc: `Each circumstance may be unique but they are boundby powerful trends.`,
    rate: '0.0%',
    url: wechatLogo,
  }
]

export const kOptions = {
  xAxis: {
    data: ['2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27']
  },
  yAxis: {},
  series: [
    {
      type: 'candlestick',
      data: [
        [20, 34, 10, 38],// [开盘值, 收盘值, 最低值, 最高值]
        [40, 35, 30, 50],
        [31, 38, 33, 44],
        [38, 15, 5, 42]
      ]
    }
  ]
};